package com.springbootee.uitl;

import org.springframework.util.DigestUtils;

public class MD5Util {
    private static final String key="mlkh21!";
    public static String encode(String str){
  return DigestUtils.md5DigestAsHex((str + key).getBytes());
    }
    public static  Boolean check(String str,String pwd){
        return  DigestUtils.md5DigestAsHex((str + key).getBytes()).equals(pwd);
    }
}
